const db= require('./database')
const data = [
    {id: 0, user_name: 'yyq',password: '123456', token:'11'},
    {id: 1, user_name: 'yyq1',password: '123456'}
]

data.map(val=>{
    let sql = `INSERT INTO users VALUES (${val.id}, '${val.user_name}','${val.password}', ${val.token})`;
    db.query(sql, (err, data)=>{
        if(err) console.log(err);
        console.log(data)
    })
})